export default{
    namespaced:true,
    state:{
        pageId:null,//页面商品ID
        keywordList:[],//历史搜索记录
        history:[],
        foods:[
            {
                img:'https://cube.elemecdn.com/e/05/526e6c1e1e2f70ae7bf7288c46c33jpeg.jpeg?x-oss-process=image/resize,m_mfit,w_84,h_84/format,webp/quality,q_90',
                foodName:"肯德基（学院店）",
                start:4.6,
                foodShopId:'kfc01',
                xiaoshou:2072,
                qisong:40,
                peisong:5,
                firstTag1:"品质保证",
                firstTag2:"加急配送",
                twoTag1:"45减3",
                twoTag2:"68减10",
                twoTag3:"品质联盟",
                p:"",
                fooddetail:[
                    {
                        name:"10块奥尔良烤腿T",
                        dec:"10块奥尔良烤腿",
                        img:"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1584275726366&di=b86157ad7c97aed8b66d08d68437c3e0&imgtype=0&src=http%3A%2F%2Fdpic.tiankong.com%2Fgb%2F3k%2FQJ8882004703.jpg",
                        month:21,
                        meny:12,
                        del:63,
                        num:0,
                        isShowPopup:true,
                        flavor:{
                            desc:'辣度',
                            descTag1:'不辣',
                            descTag2:'微辣',
                            descTag3:'中辣',
                            descTag4:'重辣',
                            descTag5:'特辣',
                        },
                        norms:{
                            desc:'规格',
                        }
                    },
                    {
                        name:"香辣炸鸡",
                        dec:"香辣多汁，口感鲜美",
                        img:require("@/assets/img/kfc2.jpg"),
                        month:21,
                        meny:24,
                        del:63,
                        num:0,
                        isShowPopup:true,
                        flavor:{
                            desc:'辣度',
                            descTag1:'不辣',
                            descTag2:'微辣',
                            descTag3:'中辣',
                            descTag4:'重辣',
                            descTag5:'特辣',
                        },
                        norms:{
                            desc:'规格',
                        }
                    },
                    {
                        name:"新炸鸡百威啤酒小吃桶T",
                        dec:"香辣鸡翅6块+新奥尔鸡翅4块+...",
                        img:require("@/assets/img/kfc3.jpg"),
                        month:21,
                        meny:58,
                        del:104,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"单人套餐",
                        dec:"香脆",
                        img:require("@/assets/img/kfc4.jpg"),
                        month:21,
                        meny:25,
                        del:104,
                        num:0,
                        isShowPopup:false
                    }
                ]
            },
            {
                img:'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1583690927575&di=5997ab0588715caf46c64cbcf3de775a&imgtype=0&src=http%3A%2F%2F04imgmini.eastday.com%2Fmobile%2F20180828%2F20180828145727_c10e36e793bb5f2aa92222b1c5c18bbd_12.jpeg',
                foodName:"妮妮蛋糕店",
                start:4.6,
                foodShopId:'cakeshop01',
                xiaoshou:1072,
                qisong:20,
                peisong:3,
                firstTag1:"棒棒哒",
                firstTag2:"人见人爱",
                twoTag1:"25减2",
                twoTag2:"45减13",
                twoTag3:"品质联盟",
                p:"附近还有4家蛋糕店>",
                to:'/home/foodlists1',
                fooddetail:[
                    {
                        name:"黑森林蛋糕",
                        dec:"新鲜乳脂蛋糕",
                        img:require("@/assets/img/dangao1.jpg"),
                        month:21,
                        meny:53,
                        del:63,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"草莓酱瑞士卷",
                        dec:"北海道特产草莓酱蛋卷瑞士卷，海绵蛋糕甜点心",
                        img:require("@/assets/img/dangao2.jpg"),
                        month:21,
                        meny:18,
                        del:63,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"约翰丹尼巧克力慕斯冷冻蛋糕",
                        dec:"西式甜点下午茶",
                        img:require("@/assets/img/dangao3.jpg"),
                        month:21,
                        meny:24.5,
                        del:104,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"甜甜甜甜点",
                        dec:"西式甜点下午茶",
                        img:require("@/assets/img/dangao4.jpg"),
                        month:21,
                        meny:22,
                        del:104,
                        num:0,
                        isShowPopup:false
                    }
                ]
            },
            {
                img:'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2402600750,1258901874&fm=26&gp=0.jpg',
                foodName:"小众糕点",
                start:4.6,
                xiaoshou:1072,
                foodShopId:'cakeshop02',
                qisong:20,
                peisong:3,
                firstTag1:"好吃",
                firstTag2:"甜而不腻",
                twoTag1:"25减2",
                twoTag2:"45减13",
                twoTag3:"品质联盟",
                p:"附近还有4家蛋糕店>",
                to:'/home/foodlists1',
                fooddetail:[
                    {
                        name:"草莓莫斯蛋糕",
                        dec:"好吃",
                        img:require("@/assets/img/gaodian1.jpg"),
                        month:16,
                        meny:14,
                        del:63,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"心心相惜",
                        dec:"入口即化",
                        img:require("@/assets/img/gaodian2.jpg"),
                        month:21,
                        meny:19,
                        del:63,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"粉色气泡",
                        dec:"是心动的感觉",
                        img:require("@/assets/img/gaodian3.jpg"),
                        month:21,
                        meny:23,
                        del:104,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"杯中蛋糕",
                        dec:"不一样的感觉",
                        img:require("@/assets/img/gaodian4.jpg"),
                        month:21,
                        meny:23,
                        del:104,
                        num:0,
                        isShowPopup:false
                    }
                ]
            },
            {
                img:'http://img2.sooshong.com/pics/201901/9/20191916505821.jpg',
                foodName:"肥姐麻辣烫",
                start:4.1,
                xiaoshou:872,
                foodShopId:'hotPot01',
                qisong:25,
                peisong:0,
                firstTag1:"麻麻辣辣",
                firstTag2:"赞赞赞",
                twoTag1:"25减5",
                twoTag2:"45减8",
                twoTag3:"首次光顾减6",
                p:"附近还有1家麻辣烫店>",
                to:'/home/foodlists2',
                fooddetail:[
                    {
                        name:"肥牛",
                        dec:"一份2片",
                        img:require("@/assets/img/mala1.jpg"),
                        month:21,
                        meny:8,
                        del:63,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"香菇",
                        dec:"一份3个",
                        img:require("@/assets/img/mala2.jpg"),
                        month:21,
                        meny:4,
                        del:63,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"鱼豆腐",
                        dec:"一份4个",
                        img:require("@/assets/img/mala3.jpg"),
                        month:21,
                        meny:3,
                        del:104,
                        num:0,
                        isShowPopup:false
                    },
                    {
                        name:"牛肉丸",
                        dec:"一份2个",
                        img:require("@/assets/img/mala4.jpg"),
                        month:21,
                        meny:3.5,
                        del:104,
                        num:0,
                        isShowPopup:false
                    }
                ]
            },
            {
                img:'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1583694510753&di=a0661d1896c7238a652dc392f271a9da&imgtype=0&src=http%3A%2F%2Fn.sinaimg.cn%2Ffront%2F480%2Fw640h640%2F20181024%2FCApH-hmxrkzw1394286.jpg',
                foodName:"柳源螺蛳粉",
                start:4.8,
                xiaoshou:1172,
                foodShopId:'powder01',
                qisong:15,
                peisong:1.5,
                firstTag1:"超好吃",
                firstTag2:"正宗螺蛳粉",
                twoTag1:"20减1",
                twoTag2:"38减5",
                twoTag3:"会员领卷减5",
                p:"",
                to:'/home/foodlists',
                fooddetail:[
                    {
                        name:"原味螺蛳粉",
                        dec:"原味螺蛳粉",
                        img:require("@/assets/img/luosi1.jpg"),
                        month:21,
                        meny:9.0,
                        del:63,
                        num:0,
                        isShowPopup:true,
                        flavor:{
                            desc:'辣度',
                            descTag1:'不辣',
                            descTag2:'微辣',
                            descTag3:'中辣',
                            descTag4:'重辣',
                            descTag5:'特辣',
                        },
                        norms:{
                            desc:'规格',
                            descTag1:'2两',
                            descTag2:'3两',
                        }
                    },
                    {
                        name:"鸭脚螺蛳粉",
                        dec:"鸭脚螺蛳粉",
                        img:require("@/assets/img/luosi2.jpg"),
                        month:21,
                        meny:13,
                        del:63,
                        num:0,
                        isShowPopup:true,
                        flavor:{
                            desc:'辣度',
                            descTag1:'不辣',
                            descTag2:'微辣',
                            descTag3:'中辣',
                            descTag4:'重辣',
                            descTag5:'特辣',
                        },
                        norms:{
                            desc:'规格',
                            descTag1:'2两',
                            descTag2:'3两',
                        }
                    },
                    {
                        name:"三鲜螺蛳粉",
                        dec:"三鲜螺蛳粉",
                        img:require("@/assets/img/luosi3.jpg"),
                        month:21,
                        meny:13,
                        del:104,
                        num:0,
                        isShowPopup:true,
                        flavor:{
                            desc:'辣度',
                            descTag1:'不辣',
                            descTag2:'微辣',
                            descTag3:'中辣',
                            descTag4:'重辣',
                            descTag5:'特辣',
                        },
                        norms:{
                            desc:'规格',
                            descTag1:'2两',
                            descTag2:'3两',
                        }
                    },
                    {
                        name:"套餐螺蛳粉",
                        dec:"套餐螺蛳粉",
                        img:require("@/assets/img/luosi4.jpg"),
                        month:21,
                        meny:18,
                        del:104,
                        num:0,
                        isShowPopup:true,
                        flavor:{
                            desc:'辣度',
                            descTag1:'不辣',
                            descTag2:'微辣',
                            descTag3:'中辣',
                            descTag4:'重辣',
                            descTag5:'特辣',
                        },
                        norms:{
                            desc:'规格',
                            descTag1:'2两',
                            descTag2:'3两',
                        }
                    }
                ]
            },
        ],
        foodsList:[],//商品数组
    },
    mutations:{
        // 搜索功能
        search(state){
            state.keywordList.push(state.stakeyword);
            return state.foods.filter(_=>_.foodName.includes(state.keyword));
        },
    },
    acttions:{},
    getters:{
        
    },
    modules:{}
}